export default defineNuxtPlugin((nuxtApp) => {
    // 阻止双击缩放
    document.addEventListener('dblclick', (e) => {
        e.preventDefault();
    }, { passive: false });

    // 阻止双指缩放
    let touchStart = [];
    document.addEventListener('touchstart', (e) => {
        touchStart = e.touches;
    }, { passive: false });

    document.addEventListener('touchmove', (e) => {
        // 如果检测到两个手指，则阻止默认行为
        if (e.touches.length === 2) {
            e.preventDefault();
        }
    }, { passive: false });
});
